package com.dragon.modules.yuegou.query.points;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.points.ClearEntity;
import com.dragon.modules.yuegou.enums.points.ClearStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDate;
import java.time.LocalDateTime;
/**
 * 积分清零任务表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-11-20 15:25:36
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ClearQuery extends ClearEntity implements Query<ClearEntity>{

    /**  查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 清理时间查询条件 */
	@JsonUnwrapped(prefix = "clearDate")
	private Condition<LocalDate> clearDateCondition;

    /** 清理积分查询条件 */
	@JsonUnwrapped(prefix = "clearPoint")
	private Condition<Integer> clearPointCondition;

    /** 清理会员查询条件 */
	@JsonUnwrapped(prefix = "clearMember")
	private Condition<Integer> clearMemberCondition;

    /** [枚举]执行状态：0-待执行-READY、1-已执行-COMPLETE、2-已取消-CANCEL查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<ClearStatus> statusCondition;

    /** 创建人查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "delBy")
	private Condition<String> delByCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public ClearQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ClearQuery(ClearEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ClearQuery(ClearQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.clearDateCondition != null) {
			this.clearDateCondition = other.clearDateCondition.copy();
		}
		if(other.clearPointCondition != null) {
			this.clearPointCondition = other.clearPointCondition.copy();
		}
		if(other.clearMemberCondition != null) {
			this.clearMemberCondition = other.clearMemberCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.delByCondition != null) {
			this.delByCondition = other.delByCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ClearEntity> toQueryWrapper() {
		QueryWrapper<ClearEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (clearDateCondition != null) {
			clearDateCondition.toWrapper(wrapper, COL_CLEAR_DATE);
		}
		if (clearPointCondition != null) {
			clearPointCondition.toWrapper(wrapper, COL_CLEAR_POINT);
		}
		if (clearMemberCondition != null) {
			clearMemberCondition.toWrapper(wrapper, COL_CLEAR_MEMBER);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (delByCondition != null) {
			delByCondition.toWrapper(wrapper, COL_DEL_BY);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回 查询条件
	 * 
	 * @return idCondition  查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取 查询条件
	 * 
	 * @return idCondition  查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置 查询条件
	 * 
	 * @param idCondition  查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回清理时间查询条件
	 * 
	 * @return clearDateCondition 清理时间查询条件
	 */
	public Condition<LocalDate> clearDate() {
		this.clearDateCondition = new Condition<>();
		return this.clearDateCondition;
	}
	
	/**
	 * 获取清理时间查询条件
	 * 
	 * @return clearDateCondition 清理时间查询条件
	 */
	public Condition<LocalDate> getClearDateCondition() {
		return clearDateCondition;
	}

	/**
	 * 设置清理时间查询条件
	 * 
	 * @param clearDateCondition 清理时间查询条件
	 */
	public void setClearDateCondition(Condition<LocalDate> clearDateCondition) {
		this.clearDateCondition = clearDateCondition;
	}

	/**
	 * 构造并返回清理积分查询条件
	 * 
	 * @return clearPointCondition 清理积分查询条件
	 */
	public Condition<Integer> clearPoint() {
		this.clearPointCondition = new Condition<>();
		return this.clearPointCondition;
	}
	
	/**
	 * 获取清理积分查询条件
	 * 
	 * @return clearPointCondition 清理积分查询条件
	 */
	public Condition<Integer> getClearPointCondition() {
		return clearPointCondition;
	}

	/**
	 * 设置清理积分查询条件
	 * 
	 * @param clearPointCondition 清理积分查询条件
	 */
	public void setClearPointCondition(Condition<Integer> clearPointCondition) {
		this.clearPointCondition = clearPointCondition;
	}

	/**
	 * 构造并返回清理会员查询条件
	 * 
	 * @return clearMemberCondition 清理会员查询条件
	 */
	public Condition<Integer> clearMember() {
		this.clearMemberCondition = new Condition<>();
		return this.clearMemberCondition;
	}
	
	/**
	 * 获取清理会员查询条件
	 * 
	 * @return clearMemberCondition 清理会员查询条件
	 */
	public Condition<Integer> getClearMemberCondition() {
		return clearMemberCondition;
	}

	/**
	 * 设置清理会员查询条件
	 * 
	 * @param clearMemberCondition 清理会员查询条件
	 */
	public void setClearMemberCondition(Condition<Integer> clearMemberCondition) {
		this.clearMemberCondition = clearMemberCondition;
	}

	/**
	 * 构造并返回[枚举]执行状态：0-待执行-READY、1-已执行-COMPLETE、2-已取消-CANCEL查询条件
	 * 
	 * @return statusCondition [枚举]执行状态：0-待执行-READY、1-已执行-COMPLETE、2-已取消-CANCEL查询条件
	 */
	public Condition<ClearStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]执行状态：0-待执行-READY、1-已执行-COMPLETE、2-已取消-CANCEL查询条件
	 * 
	 * @return statusCondition [枚举]执行状态：0-待执行-READY、1-已执行-COMPLETE、2-已取消-CANCEL查询条件
	 */
	public Condition<ClearStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]执行状态：0-待执行-READY、1-已执行-COMPLETE、2-已取消-CANCEL查询条件
	 * 
	 * @param statusCondition [枚举]执行状态：0-待执行-READY、1-已执行-COMPLETE、2-已取消-CANCEL查询条件
	 */
	public void setStatusCondition(Condition<ClearStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人查询条件
	 * 
	 * @param createdByCondition 创建人查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return delCondition 查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return delCondition 查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param delCondition 查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return delByCondition 查询条件
	 */
	public Condition<String> delBy() {
		this.delByCondition = new Condition<>();
		return this.delByCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return delByCondition 查询条件
	 */
	public Condition<String> getDelByCondition() {
		return delByCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param delByCondition 查询条件
	 */
	public void setDelByCondition(Condition<String> delByCondition) {
		this.delByCondition = delByCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return delTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return delTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param delTimeCondition 查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}

}
